/**
 * Created by lvliqi on 2017/6/14.
 */
const router = require('koa-router')();
const request = require('request');

router.get('/image/html/show', async ctx => {
    let {url} = ctx.query;
    // let x = request(url);
    // ctx.request.pipe(x);
    // x.pipe(ctx.response);
    // request(url).pipe(function (a, b, c) {
    //     console.log(a, b, c);
    // })
    ctx.body = request(url);
    // await ctx.request.pipe(request(url)).pipe(ctx.response);
});


module.exports = router;